package org.andao.core.base.model;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

import org.hibernate.annotations.GenericGenerator;

/**
 * 提供一个可继承的根Model.
 * 
 * @author Seewo software - Marco.hu(huzhiguo@cvte.cn)
 */
@MappedSuperclass
public abstract class RootModel implements Model, java.io.Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(length=32)
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")	
	private String resourceid;//ID，必须为"resourceid"
	
	@Version
	private Long version;//版本
	
	@Column(name="isDeleted")
	private Integer isDeleted  = 0;//是否删除
	
	public String getResourceid() {
		return resourceid;
	}

	public void setResourceid(String resourceid) {
		this.resourceid = resourceid;
	}
	
	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public Integer getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(Integer isDeleted) {
		this.isDeleted = isDeleted;
	}

	
		
}
